--aliases & variables
--Datos del theme
ThemeData = {
	Nombre = THEME:GetString("Common","WindowTitle");
	Version = "1.1";
	Fecha = {23, 3, 2009};
	Readme = THEME:GetString("Common","Readme");
	Report = THEME:GetString("Common","Report");
	Sites = {
		"www.piusm.com",
		"www.stepmania.com",
		"www.mxpumpers.net",
		"www.ph-online.net",
	};
}

--Prefs
PREFSMAN:SetPreference("Premium",'Premium_DoubleFor1Credit')
PREFSMAN:SetPreference("AutogenGroupCourses",false)
PREFSMAN:SetPreference("AllowW1",'AllowW1_Never')
PREFSMAN:SetPreference("EasterEggs",false)
PREFSMAN:SetPreference("BGBrightness",0.8)
PREFSMAN:SetPreference("MachineName","SMPREX3")
PREFSMAN:SetPreference("Center1Player",false)
PREFSMAN:SetPreference("NumBackgrounds",5)
--PREFSMAN:SetPreference("","")

--kod3z del t1tl3zm3nuh
function BonusCodes( name )
	--taps, triggers...
	local x = {
		"Select",
		"UpLeft",
		"UpRight",
		"DownLeft",
		"DownRight",
		"Center",
	}
	--code patterns
	local Codes = {
		LifePerc = x[1]..","..x[2]..","..x[4]..","..x[2]..","..x[4]..","..x[5]..","..x[3]..","..x[5]..","..x[3];
		ResultPc = x[1]..","..x[2]..","..x[3]..","..x[4]..","..x[5]..","..x[2]..","..x[3]..","..x[4]..","..x[5];
		Progress = x[1]..","..x[3]..","..x[2]..","..x[5]..","..x[4]..","..x[3]..","..x[2]..","..x[5]..","..x[4];
		TimeLbls = x[1]..","..x[3]..","..x[5]..","..x[4]..","..x[2]..","..x[5]..","..x[3]..","..x[2]..","..x[4];
		StgTicks = x[1]..","..x[2]..","..x[4]..","..x[5]..","..x[3]..","..x[2]..","..x[4]..","..x[5]..","..x[3];
		Reset = x[1]..","..x[1]..","..x[1]..","..x[1]..","..x[1];
	}
	return Codes[name]
end

--Lets get auto!
function MakeOptionOrders( scr, dir )
	local Choices = THEME:GetMetric(scr, "ChoiceNames")
	Choices = split(",",Choices)
	local built = ""
	
	for i=2,#Choices do
		built = built .. Choices[i-1] .. ":" .. Choices[i] .. ","
	end
	built = built .. Choices[#Choices] .. ":" .. Choices[1]
	
	if dir == "left" then
		return string.reverse(built)
	elseif dir == "right" then
		return built
	else
		built = ""
		for i=1,#Choices-1 do
			built = built .. Choices[i] .. ":" .. Choices[i] .. ","
		end
		built = built .. Choices[#Choices] .. ":" .. Choices[#Choices]
		return built
	end
end

function StageBreak()
	if GAMESTATE:GetEasiestStepsDifficulty() == 'Difficulty_Beginner'
	or GAMESTATE:GetEasiestStepsDifficulty() == 'Difficulty_Easy' then
		return -1
	else
		return 51
	end
end

function ScreenSelectStyleScrollerTransform(self,offset,itemIndex,numItems)
	self:x(-(offset^2)*10);
	self:y(offset * 80);
end

--[[
code Daisuke Master (c)

Términos de uso:
1.- Eres libre de usar todo o parte de éste código, sólamente dame crédito o incluye este bracket de comments en el luafile
2.- No permito que se use para fines comerciales
3.- Si quieres usar el código para fin comercial
	a). Contáctame por X o Y medio pero que sea directo de preferencia
		(messenger, phone si se puede (aver donde lo consigues xD))
	b). Móchate una feriecita xD no seas gacho
]]